home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 July / macformat-026.iso / mac / Shareware City / Developers / SoundMate Plug-In Kit / Beginning.π ƒ / Beginning.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-21  |  1.3 KB  |  69 lines  |  [TEXT/KAHL]

  1. /*****
  2.  * Beginning.c
  3.  *
  4.  *    SoundEditor: Copyright (c) 1993 by
  5.  *
  6.  *    Motion Works Corp.
  7.  *    #130 - 1020 Mainland Street
  8.  *    Vancouver, BC
  9.  *    (604) 685-9975
  10.  *
  11.  *  Author:    DMS        (21DEC93)
  12.  *
  13.  *    Beginning sound effect (SE) component source for Marvin's Modulator
  14.  *
  15.  *****/
  16.  
  17. #include <MacHeaders>
  18. #include <QuickTimeComponents.h>
  19.  
  20.     // prototype
  21.  
  22. pascal ComponentResult _SEWorksOnSelectionOnly(    Boolean *answer );
  23.  
  24. pascal ComponentResult _SEDoEffect( Handle theSound,
  25.                                     Size *selectionStart, Size *selectionEnd,
  26.                                     Handle *newSound,
  27.                                     Size *insertStart, Size *deleteEnd );
  28.  
  29.  
  30. /***
  31.  * _SEWorksOnSelectionOnly
  32.  *
  33.  *        returns TRUE to signify that it should only be enabled when there is a selection
  34.  *
  35.  ***/
  36.  
  37. pascal ComponentResult _SEWorksOnSelectionOnly(    Boolean *answer )
  38. {
  39.     *answer = FALSE;
  40.     
  41.     return noErr;
  42. }
  43.  
  44.  
  45.  
  46. /***
  47.  * _SEEffect
  48.  *
  49.  *        Reverse the selected samples and return a new sound with those samples in it.
  50.  *
  51.  ***/
  52.  
  53. pascal ComponentResult _SEDoEffect(    Handle theSound,
  54.                                     Size *selectionStart, Size *selectionEnd,
  55.                                     Handle *newSound,
  56.                                     Size *insertStart, Size *deleteEnd )
  57. {
  58.         // set selection to beginning
  59.     *selectionStart = *selectionEnd = 0;
  60.     
  61.         // don't delete any samples
  62.     *insertStart = *deleteEnd = 0;
  63.  
  64.         // no new sound to insert    
  65.     *newSound = NULL;
  66.     
  67.     return noErr;
  68. }
  69.